@extends('layout.admin.master')
@section('content')
        <div class="card">
            <div class="card-body">
                <ul class="nav nav-tabs nav-tabs-sm">
                    <li class="nav-item">
                        <a href="{{route('news.classify.index')}}" class="nav-link ">
                            新闻分类列表
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="{{route('news.classify.create')}}" class="nav-link ">
                            添加新闻分类
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="" class="nav-link active">
                            编辑新闻分类
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <form action="{{route('news.classify.update',$classify)}}" method="post" id="app">
            @csrf @method('PUT')
        <div class="card">
            <div class="card-body">
                <div class="form-group">
                    <label for="">分类名称</label>
                    <input type="text" name="name" value="{{$classify->name}}" class="form-control" placeholder="" aria-describedby="helpId">
                </div>

                <div class="form-group">
                    <label for="">选择顶级分类</label>
                    <select name="pid" id="">
                        <option value="0">顶级分类</option>
                        @foreach($data as $value)
                            <option  {{$classify->pid==$value['id']?'selected':'' }} {{$value['_disabled']}} value="{{$value['id']}}">{{$value['_name']}}</option>
                            @endforeach
                    </select>
                </div>
            </div>
        </div>
        <div class="card-footer text-muted">
        <button type="submit" class="btn btn-primary">保存数据</button>
        </div>
    </form>
@endsection
@push('js')

@endpush
